import request from '@/utils/request';
/**
 * 获取用户分页列表
 *
 * @param queryParams
 */
export function getProductPage(queryParams) {
  return request({
    url: '/sys/product/list',
    method: 'post',
    data: queryParams,
  });
}

/**
 * 获取用户表单详情
 *
 * @param ProductId
 */
export function findProductById(productId) {
  return request({
    url: 'sys/product/findById',
    method: 'get',
    params: {
      id: productId,
    },
  });
}

/**
 * 添加用户
 *
 * @param data
 */
export function saveProduct(data, isLoading) {
  return request({
    url: '/sys/product/save',
    method: 'post',
    isLoading: isLoading,
    data: data,
  });
}

/**
 * 删除用户
 *
 * @param ids
 */
export function deleteProducts(ids, isLoading) {
  return request({
    url: '/sys/product/delete',
    method: 'post',
    isLoading: isLoading,
    data: {
      ids: ids,
    },
  });
}
